<?php
/**
 * Created by PhpStorm.
 * User: 93195
 * Date: 2018/2/24
 * Time: 13:44
 */
class pointModule extends Module {

    /*
     * 在构造函数中装载所依赖的类或其他文件
    */
    function __construct() {
        $this->includePhp('point', 'point');
    }
    /*
     * 调用插件资源
    */
    public function call($user, $method, $params) {
        switch ($method) {
            case 'index':
                point::index();
                break;
            case 'userPointBill':
                $start = $params->start;
                $limit = $params->limit;
                point::userPointBill($start, $limit);
                break;
            case 'getPointProduct':
                $start = $params->start;
                $limit = $params->limit;
                point::getPointProduct(false, '', '', '', '', '', $start, $limit, 'prod.number', 'desc', false, null, null, null, null, null, 1, null);
                break;
            case 'pointSuccess':
                $oid = $params->id;
                point::pointSuccess($oid);
                break;
        }
    }
}


$module = new pointModule();
Module::addModule($module);